//package cn.autumnorange.app.authorization.security.security;
//
//import cn.autumnorange.app.common.rpc.gts.GtsServiceImpl;
//import cn.autumnorange.app.common.servletrequest.HttpServletRequestRPCWrapper;
//import org.springframework.stereotype.Component;
//import org.springframework.web.context.request.RequestContextHolder;
//import org.springframework.web.context.request.ServletRequestAttributes;
//
//import javax.servlet.http.HttpServletRequestWrapper;
//
//@Component
//public class SpringSecurityOauth2GtsServiceImpl extends GtsServiceImpl {
//    //    HttpSessionSecurityContextRepository.Servlet3SaveToSessionRequestWrapper
//    public HttpServletRequestRPCWrapper getHttpServletRequestRPCWrapper() {
//        ServletRequestAttributes attributes =
//                (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
//        HttpServletRequestWrapper httpServletRequestWrapper = (HttpServletRequestWrapper) attributes.getRequest();
//        HttpServletRequestRPCWrapper httpServletRequestRPCWrapper = (HttpServletRequestRPCWrapper) httpServletRequestWrapper.getRequest();
//        return httpServletRequestRPCWrapper;
//    }
//}
